    /********************************************************/
    /*                                                      */
    /*                                                      */
    /*         Copyright (C), 1993  SEIKO EPSON Corp.       */
    /*         ALL RIGHTS RESERVED                          */
    /*                                                      */
    /*                                                      */
    /*  file name : perror.c                                */
    /*                                                      */
    /*  Revision history                                    */
    /*      93/12/17    first release       S.Akaiwa        */
    /*      97/3/17	modified	    T.Katahira	    */
    /*			change function declaration	    */
    /*					to the ANSI style   */
    /*                                                      */
    /********************************************************/

#ifdef      UNIX
#include    "stdio.h"
#include    "errno.h"
#else
#include    <stdio.h>
#include    <errno.h>
#endif

void
perror(const char * sMsgP)

    /********************************************************/
    /*                                                      */
    /*  The perror function prints an error number and      */
    /*  message pointed to by sMsgP to stderr.              */
    /*  Output format as follows:                           */
    /*                                                      */
    /*      Format:                                         */
    /*          "[message :] error number\n"                */
    /*                                                      */
    /*      RETURN  Nothing                                 */
    /*                                                      */
    /*  <ANSI>                                              */
    /*                                                      */
    /*      The perror function prints an error message and */
    /*      user specified message to stderr. Output format */
    /*      as follows:                                     */
    /*                                                      */
    /*      Format:                                         */
    /*          "[message :] error message\n"               */
    /*                                                      */
    /*      RETURN  Nothing                                 */
    /*                                                      */
    /********************************************************/

    /* const char    *sMsgP  ;    pointer to output message */
    {
     if((sMsgP != NULL) && (*sMsgP != '\0')){
                                           /* exist message */ 
                           /* output user specified message */ 
        fprintf(stderr, "%s : ", sMsgP);
     }
    
     fprintf(stderr, "%d\n", errno); /* output error number */
  
     return;                        /* exit perror function */
    }

